import React from 'react'
import { Form, Input, Row, Col, DatePicker } from 'antd'
import ArbitratorSelector from './ArbitratorSelector'
const { Item } = Form
const { TextArea } = Input
const shortLabel = { span: 6 }
const shortWrap = { span: 16 }

function Main ({ formRef, pState, pDispatch }) {
  return (
    <>
      <Item name='contract_type' noStyle><span /></Item>
      <Item name='id' noStyle><span /></Item>
      <Item name='contract' noStyle><span /></Item>
      <ArbitratorSelector pState={pState} formRef={formRef} />
      <Item name='address' label='地址' required={[{ required: true, message: '地址不能为空' }]}>
        <TextArea rows={3} placeholder='请输入地址' />
      </Item>
      <Item name='mobile' label='移动电话'>
        <Input placeholder='请输入移动电话' />
      </Item>
      <Item name='tel' label='住宅电话'>
        <Input placeholder='请输入住宅电话' />
      </Item>
      <Item name='tel_office' label='办公电话'>
        <Input placeholder='请输入办公电话' />
      </Item>
      <Item name='structure' label='单位'>
        <Input placeholder='请输入单位' />
      </Item>
      <Row>
        <Col span={12}>
          <Item name='processerid' noStyle><span /></Item>
          <Item name='processer' label='办案秘书' labelCol={shortLabel} wrapperCol={shortWrap} required={[{ required: true, message: '请输入办案秘书' }]}>
            <Input disabled />
          </Item>
        </Col>
        <Col span={12}>
          <Item name='processer_tel' label='电话' labelCol={shortLabel} wrapperCol={shortWrap} required={[{ required: true, message: '请输入电话' }]}>
            <Input disabled />
          </Item>
        </Col>
      </Row>
      <Row>
        <Col span={12}>
          <Item name='send_datetime' label='收寄日期' labelCol={shortLabel} wrapperCol={shortWrap} rules={[{ type: 'object', required: true, message: '请选择收寄日期' }]}>
            <DatePicker placeholder='请选择收寄日期' style={{ width: '100%' }} />
          </Item>
        </Col>
      </Row>
      <Item name='content' label='送达内容' rules={[{ required: true, message: '请输入送达内容' }]}>
        <TextArea rows={3} placeholder='请输入送达内容' />
      </Item>
      <Item name='remark' label='备注'>
        <TextArea rows={3} placeholder='请输入备注' />
      </Item>
    </>
  )
}

export default Main
